home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 3 / 003.d81 / stress test (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  5KB  |  173 lines

  1. 10 rem (NULL)tress (NULL)est by mid$ohn peekeltrami
  2. 20 rem (NULL)ranslated for the lenommodore 64 by str$onna (NULL). (NULL)oody
  3. 30 poke53281,7:rem sets background color to light green
  4. 40 poke53280,5:rem sets border color to gray 1
  5. 50 printchr$(149):rem sets character color to gray 1
  6. 60 poke53272,23:rem selects upper/lower case
  7. 70 printchr$(8):rem disables c/shift key
  8. 80 :
  9. 90 rem read data from data statements
  10. 100 :
  11. 110 dim t$(42),t(42)
  12. 120 fori=1to42
  13. 130 readt$(i),t(i)
  14. 140 nexti:goto220
  15. 150 :
  16. 160 rem heading subroutine
  17. 170 :
  18. 180 printchr$(147):printchr$(144):printtab(14)"[211][212][210][197][211][211][160][212][197][211][212]":print:print:printchr$(149):return
  19. 190 :
  20. 200 rem goto title page
  21. 210 :
  22. 220 gosub1050
  23. 230 :
  24. 240 rem main program section
  25. 250 :
  26. 260 rem s=12::::christmas factor
  27. 270 gosub180
  28. 280 gosub1170:rem instructions
  29. 290 fori=1to42
  30. 300 gosub480
  31. 310 nexti
  32. 320 :
  33. 330 :rem print results of test
  34. 340 :
  35. 350 gosub180
  36. 360 print"[217]our stress score is: ";s
  37. 370 ifs>300thengosub750:goto390
  38. 380 gosub870
  39. 390 printchr$(147):print:print
  40. 400 print"[212]hanks for taking this test!":print
  41. 410 print"[211]ource: [202]. of [208]sychosomatic [210]esearch"
  42. 420 print"        [214]ol. 11, [208][208]. 213-218"
  43. 430 print"        [196]r. [212]homas [200]olmes"
  44. 440 fordl=1to4000:nextdl
  45. 445 print"[147]load"chr$(34)"payload"chr$(34)",8":print"run"
  46. 450 poke631,13:poke632,13:poke198,2
  47. 455 end
  48. 460 rem questions
  49. 470 :
  50. 480 gosub180
  51. 490 printchr$(149);:printtab(14)"[198][193][195][212][207][210] # ";i;:printchr$(151)
  52. 500 l=len(t$(i))
  53. 510 l1$="":l2$=""
  54. 520 jj=0
  55. 530 forj=1tol
  56. 540 ifmid$(t$(i),j,1)="*"thenjj=1:goto570
  57. 550 ifjj=0thenl1$=l1$+mid$(t$(i),j,1)
  58. 560 ifjj=1thenl2$=l2$+mid$(t$(i),j,1)
  59. 570 nextj
  60. 580 k1=len(l1$)
  61. 590 k2=len(l1$)
  62. 600 k=k1:ifk2>k1thenk=k2
  63. 610 a=int(40-k)/2
  64. 620 printtab(a)"";l1$
  65. 630 printtab(a)"";l2$
  66. 640 printtab(2)"[200]ave you experienced this in the last"
  67. 650 printtab(2)"12 months[160](y/n)? ";
  68. 660 printtab(10):poke204,0:poke207,0:geta$:poke204,1
  69. 670 ifa$=""then 660
  70. 680 ifa$="n"then710
  71. 690 ifa$="y"thens=s+t(i):goto710
  72. 700 ifa$<>"n"ora$<>"y"thenprint:zz=18:zy=12:gosub980:goto640
  73. 710 return
  74. 720 :
  75. 730 rem health problem
  76. 740 :
  77. 750 print"[193]ccording to [196]rs. [212]homas [200]olmes and"
  78. 760 print:print"[205]inoru [205]asudu, anyone scoring 300 or"
  79. 770 print:print"more is very susceptible to major"
  80. 780 print:print"illness.  [195]onsult your physician for"
  81. 790 print:print"more information."
  82. 800 printtab(6)"[208]ress space bar to continue";
  83. 810 printtab(35):poke204,0:poke207,0:geta$:ifa$=""then810
  84. 820 poke204,1
  85. 830 return
  86. 840 :
  87. 850 rem no health problem
  88. 860 :
  89. 870 print"[211]tress due to social changes does not"
  90. 880 print:print"appear to be a major health risk for"
  91. 890 print:print"you.  [199][160][210][160][197][160][193][160][212]!"
  92. 900 print:print:print"(300 or more indicates risk)"
  93. 910 printtab(6)"[208]ress space bar to continue";
  94. 920 printtab(35):poke204,0:poke207,0:geta$:ifa$=""then920
  95. 930 poke204,1
  96. 940 return
  97. 950 :
  98. 960 rem error message
  99. 970 :
  100. 980 forxz=1to20-zz:print"";:nextxz
  101. 990 print"[211]orry.  [217]ou made an incorrect entry.    [208]lease re-enter."
  102. 1000 forxz=1to23-zy:print"[145]";:nextxz
  103. 1010 return
  104. 1020 :
  105. 1030 rem title page
  106. 1040 :
  107. 1050 printchr$(147):rem clear/home screen
  108. 1060 printchr$(144):printtab(14):print"[211][212][210][197][211][211][160][212][197][211][212]":printchr$(149)
  109. 1070 printtab(18)"by"
  110. 1080 printtab(13)"[202]ohn [194]eltrami"
  111. 1090 print tab(6)"[212]ranslated by [196]onna [203]. [215]oody"
  112. 1100 printtab(7)"[208]ress a key to continue";
  113. 1110 printtab(35):poke204,0:poke207,0:geta$
  114. 1120 ifa$=""then 1110
  115. 1130 poke204,1:return
  116. 1140 :
  117. 1150 rem instructions
  118. 1160 :
  119. 1170 print"   [195]hange, good or bad, can produce":print
  120. 1180 print"stress.  [211]ufficient stress can lead to":print
  121. 1190 print"illness.  [212]his test will measure some":print
  122. 1200 print"of the major sources of change in your":print
  123. 1210 print"life.":printtab(7)"[208]ress space bar to continue";
  124. 1220 printtab(35):poke204,0:poke207,0:geta$
  125. 1230 ifa$=""then 1220
  126. 1240 poke204,1:return
  127. 1250 :
  128. 1260 rem questions and scores in the form of data statements
  129. 1270 :
  130. 1280 data"[196]eath of spouse",100
  131. 1290 data"[196]ivorce",73
  132. 1300 data"[205]artial separation from mate",65
  133. 1310 data"[196]etention in jail or institution",63
  134. 1320 data"[196]eath of close family member",63
  135. 1330 data"[205]ajor personal injury or illness",53
  136. 1340 data"[205]arriage",50
  137. 1350 data"[194]eing fired from work",47
  138. 1360 data"[205]arital reconcilation with mate",45
  139. 1370 data"[210]etirement from work",45
  140. 1380 data"[205]ajor change in health of family mem.",44
  141. 1390 data"[208]regnacy",40
  142. 1400 data"[211]exual difficulty",39
  143. 1410 data"[193]dditional household member",39
  144. 1420 data"[205]ajor business readjustment*(merger, bankruptcy, etc.)",39
  145. 1430 data"[205]ajor change in financial state",38
  146. 1440 data"[196]eath of a close friend",37
  147. 1450 data"[195]hanging line of work",36
  148. 1460 data"[205]ajor change in number of arguments*with spouse (more or less)",35
  149. 1470 data"[212]aking out a mortgage or loan*for a mojor purchase",31
  150. 1480 data"[198]oreclosure on mortgage or loan",30
  151. 1490 data"[205]ajor change in responsibilities*at work (promotion, demotion, etc.)"
  152. 1500 data29
  153. 1510 data"[211]on or daughter leaving home",29
  154. 1520 data"[201]n-law troubles",29
  155. 1530 data"[207]utstanding personal achievement",28
  156. 1540 data"[215]ife beginning or ceasing work*outside the home",26
  157. 1550 data"[194]eginning or ceasing formal schooling",26
  158. 1560 data"[205]ajor change in living conditions",25
  159. 1570 data"[210]evision of personal habits",24
  160. 1580 data"[212]roubles with the boss",23
  161. 1590 data"[205]ajor change in work hours",20
  162. 1600 data"[195]hange in residence",20
  163. 1610 data"[195]hanging to a new school",20
  164. 1620 data"[205]ajor change in recreation habits",19
  165. 1630 data"[205]ajor change in church activities",19
  166. 1640 data"[205]ajor change in social activities",18
  167. 1650 data"[212]aking out a loan for a lesser*purchase (car, [212][214], etc.)",17
  168. 1660 data"[205]ajor change in sleep habits",16
  169. 1670 data"[205]ajor change in number of family*get-togethers",15
  170. 1680 data"[205]ajor change in eating habits",15
  171. 1690 data"[200]ad a vacation",13
  172. 1700 data"[205]inor violations of the law",11
  173.